Optimal. Leaf size=176 \[ \frac {\sqrt {a} (6 A+5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a (6 A+5 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}+\frac {a (6 A+5 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 176, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {4101, 3888,
3886, 221} \begin {gather*} \frac {a (6 A+5 B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{12 d \sqrt {a \sec (c+d x)+a}}+\frac {a (6 A+5 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{8 d \sqrt {a \sec (c+d x)+a}}+\frac {\sqrt {a} (6 A+5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 d}+\frac {a B \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x)}{3 d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 3886
Rule 3888
Rule 4101
Rubi steps
\begin {align*} \int \sec ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx &=\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{6} (6 A+5 B) \int \sec ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a (6 A+5 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{8} (6 A+5 B) \int \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a (6 A+5 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}+\frac {a (6 A+5 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{16} (6 A+5 B) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a (6 A+5 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}+\frac {a (6 A+5 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}-\frac {(6 A+5 B) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}\\ &=\frac {\sqrt {a} (6 A+5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a (6 A+5 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}+\frac {a (6 A+5 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.48, size = 131, normalized size = 0.74 \begin {gather*} \frac {\sqrt {a (1+\sec (c+d x))} \left (3 \sqrt {2} (6 A+5 B) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sec \left (\frac {1}{2} (c+d x)\right )+(18 A+31 B+4 (6 A+5 B) \cos (c+d x)+3 (6 A+5 B) \cos (2 (c+d x))) \sec ^3(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{48 d \sqrt {\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(407\) vs.
\(2(150)=300\).
time = 7.11, size = 408, normalized size = 2.32
method | result | size |
default | \(\frac {\left (18 A \left (\cos ^{3}\left (d x +c \right )\right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}-18 A \left (\cos ^{3}\left (d x +c \right )\right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}+15 B \left (\cos ^{3}\left (d x +c \right )\right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}-15 B \left (\cos ^{3}\left (d x +c \right )\right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}+36 A \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+30 B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+24 A \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+20 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+16 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )-1\right )}{96 d \sin \left (d x +c \right )^{2}}\) | \(408\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 3342 vs.
\(2 (150) = 300\).
time = 0.78, size = 3342, normalized size = 18.99 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.52, size = 448, normalized size = 2.55 \begin {gather*} \left [\frac {3 \, {\left ({\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {4 \, {\left (3 \, {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right ) + 8 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{96 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}, \frac {3 \, {\left ({\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right ) + \frac {2 \, {\left (3 \, {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (6 \, A + 5 \, B\right )} \cos \left (d x + c\right ) + 8 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{48 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________